<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lmpop.createIndex.search.MidNavIndexFiles"%>
<%@page import="com.lmpop.createIndex.search._8diansckeywordIndexFiles"%>
<%@page import="com.lmpop.trade.shopcart.Goods"%>
<%@page import="com.lmpop.trade.shopcart.CartServices"%>
		<%
	response.setHeader("Pragma","No-cache");
	response.setHeader("Cache-Control","no-cache");
	response.setDateHeader("Expires", 0); 
	 %>
<!--顶部开始-->
<%
String _user_name = "";
	if (session.getAttribute("session_user_name") != null&& !"".equals(session.getAttribute("session_user_name"))) {
		_user_name = session.getAttribute("session_user_name").toString();
	}
		 String user_id = "";
	if (session.getAttribute("session_user_id") != null) {
		user_id = session.getAttribute("session_user_id").toString().trim();
	}
	
	Hashtable<String, Hashtable<String, Goods>> cartMap = null;
			CartServices top_shopcart = null;
			if (session.getAttribute("shoppingCart") != null) {
				top_shopcart = (CartServices) session.getAttribute("shoppingCart");
				cartMap = top_shopcart.getCartMap();
			}
		int top_totalGoodsCount = 0;
			if (top_shopcart != null) {
				top_totalGoodsCount = top_shopcart.getAllItemsCount();
				session.setAttribute("top_totalGoodsCount",top_totalGoodsCount);
			}
	
 %>
 	document.write('<div id="top">');
 	document.write(' <div class="header_top">');
 	document.write('<ul>');
	document.write('<li class="F" id="li_tip">');
      	<%
      		if(_user_name!=null&&!"".equals(_user_name)){%>
      			document.write('<%=_user_name %>，欢迎光临雷鸣商城！');
				document.write('<strong><a href="/shop_member.html">[会员中心]</a></strong>');
	      		document.write('<strong><a href="/program/logout">[退出]</a></strong>');
	      		
      		<%}else{%>
      			document.write('您好，欢迎光临雷鸣商城！');
      			document.write('<strong><a href="/shop_signin.html">[登录]</a></strong>');
      			document.write('<strong><a href="/shop_register.html">[免费注册]</a></strong>');
      			
		      	
		      	
      		<%}
      	%>
 document.write(' </li></ul></div></div><!--顶部结束-->');     	
document.write(' <!--头部开始--><div id="head">');   
document.write(' <div class="header">');   
document.write(' <h1><a href="/">雷鸣商城</a></h1>');  
document.write('  <span class="search"  style="display:none">');  
document.write(' <p><img src="/templets/html/shop/images/phone.gif" align="absmiddle" />7X24小时服务热线 4000-365-010</p>');  
document.write(' <form action="/doTradeReg.do" method="post" name="addForm" target="_self">');  
document.write('  <p><input name="keyword" id="keyword" type="text" value="==请输入您的邮箱==" class="text_area" onfocus="deltext()" onblur="addtext()" >');  
document.write('<input type="button" name="button2" value="订阅" class="text_btn" onclick="return leaveSub();"/></p>'); 
document.write(' <input name="info_type" id="info_type" type="hidden" value="1">'); 
document.write('<input name="cat_id_group" id="cat_id_group" type="hidden" value="">'); 
document.write(' <input name="ch_id_group" id="ch_id_group" type="hidden" value="">'); 
document.write(' <input name="info_num" id="info_num" type="hidden" value="">'); 
document.write(' <input name="send_type" id="send_type" type="hidden" value="1">'); 
document.write(' <input name="enabled" id="enabled" type="hidden" value="0">'); 
document.write(' <input name="in_date" id="in_date" type="hidden" value="now()">'); 
document.write(' <input type="hidden" name="jumpurl" value="/data/shop.html" />');  	
 document.write(' <input type="hidden" name="bpm_id" value="7188" />');  	
 document.write('  </form></span>');  	  
 document.write(' <div class="menu"><ul>'); 	

     
    
       <%
    		MidNavIndexFiles midNavIndex = new MidNavIndexFiles();
			Map conditionMap = new Hashtable();
			conditionMap.put("cust_id", "100000000000000");
			conditionMap.put("ifshow", "0");
			conditionMap.put("nav_post", "2");
			List navList = midNavIndex.getMidNavInfo(conditionMap);
			int navListcCounts = 0;
		 	int nav_counts = 0;
		 	if (navList != null && navList.size() > 0) {
		 		navListcCounts = navList.size()>9?9:navList.size();
		 		Map navMap = new Hashtable();
		 		for (int i = 0; i < navListcCounts; i++) {
		 			navMap = (Hashtable) navList.get(i);
		 			nav_counts++;
		 			if (navMap != null && navMap.size() > 0) {
		 				String link_url = navMap.get("link_url").toString();
		 				String nav_name = navMap.get("nav_name").toString();
		 				String opennew = navMap.get("opennew").toString();
		 				String target = "_self";
		 				if (opennew.equals("0")) {
		 					target = "_blank";
		 				} else if (opennew.equals("1")) {
		 					target = "_self";
		 				}
		 				if(i==0){%>
		 				 document.write(' <li><a href="<%=link_url %>" class="current" target="<%=target %>" ><%=nav_name %></a></li>');
		 				<%}else{
		 				%>
		 				 document.write(' <li><a href="<%=link_url %>" target="<%=target %>" ><%=nav_name %></a></li>');
		 				<%}}
		 		}
		 	}
     %>
  document.write(' </ul><p></p></div></div></div><!--顶部结束-->');      
   document.write('<!--导航开始--><div class="bar"><div class="bar_main"> <div class="input">');         
document.write(' <form name="keywordForm" action="/shop_goodslist.html" >');      
document.write(' <input type="text"  name="keyword" id="keyword" class="input_area"/>');      
document.write(' <input type="button" value="搜索" name="btn" class="input_btn" onclick="checkKeyword()"/>');      
document.write('  </form><ul>');      
    
    	
        
   
      <%
       Hashtable paraMap = new Hashtable();
       _8diansckeywordIndexFiles _8diansckeywordIndex=new _8diansckeywordIndexFiles();
		 List keyList=_8diansckeywordIndex.getSearchKeyInfo(paraMap);
       %>
       document.write(' <strong>热门搜索:</strong>');
       
        <%
    		Map maptemp=null;
    		if(keyList!=null&&keyList.size()>0){
    			for(int i=0;i<keyList.size();i++){
    				maptemp=(Hashtable)keyList.get(i);%>
    				document.write('<li><a href="/shop_goodslist.html?cat_attr=<%=maptemp.get("cat_attr") %>"><%=maptemp.get("keywords") %></a></li>');
    			<%}
    		}
    	 %>
    	  document.write('  </ul></div>');
  document.write('<div class="bar_main_right">');
  document.write('<p><a href="/templets/html/shop/jsp/confirm_buycart.jsp"><em><%=top_totalGoodsCount %></em>件商品</a></p>');
  document.write('<span><a href="/templets/html/shop/jsp/confirm_buycart.jsp">结账</a></span></div>');
  document.write(' </div></div><!--顶部结束-->');   
    
      
      
 